#pragma once

#include "../Helix.h"
#include "List.h"
#include "String.h"
#include <cstdarg>
#include <fstream>
#include <Windows.h>

#define _BUFFER_SIZE	2048

namespace Framework
{
	class String
		: public List<char>
	{
	public:
		String() {}
		explicit String(const char* format, ...)
		{
			char* buffer = new char[_BUFFER_SIZE];
			va_list valist;
			va_start(valist, format);
			_vsnprintf_s(buffer, _BUFFER_SIZE, _BUFFER_SIZE, format, valist);
			va_end(valist);
			
			CopyFrom(buffer, strlen(buffer));
		}
		explicit String(const char* string);
		~String() {}

		void Replace(char a, char b)
		{
		}

		UInt32 FindFirst(char c)
		{
			return 0;
		}

		static UInt32 Length(String& string);
	};

	UInt32 String::Length(String& string)
	{
		return string.Count();
	}
};